package com.example.day08;

import java.util.Scanner;

/**
 * @author Lenovo
 */
public class StringBuilderTest06 {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String line=sc.nextLine();
        String s = myReverse(line);
        System.out.println(s);
    }
    public static String myReverse(String line){
        StringBuilder sb = new StringBuilder(line);
        sb.reverse();
        return sb.toString();
    }
}
